<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Json-server</title>
</head>
<table>
    <thead>
        <caption>文章表</caption>
        <tr>
            <td>序号</td>
            <td>标题</td>
            <td>作者</td>
        </tr>
    </thead>
    <tbody>

    </tbody>
</table>
<script>
    //前后端通信的数据格式是json 
    fetch('http://localhost3000/posts').then(data => data.json()).then(data => {
        console.log(data);

    })
</script>

<body>

</body>

</html>